package io.hepu.robotize.model;

import io.hepu.robotize.aop.RedisId;
import io.hepu.robotize.base.BaseEntity;
import io.hepu.robotize.service.impl.RoleService;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Column;
import javax.persistence.Table;
import java.io.Serializable;

@ApiModel(value = "角色")
@Table(name = "tb_role")
@RedisId(id = 902000000001L, table = "tb_role", provider = RoleService.class)
public class Role extends BaseEntity<String> implements Serializable {
    @ApiModelProperty(value = "租户ID")
    @Column(name = "tenant_id")
    private String tenantId;

    @ApiModelProperty(value = "角色编码")
    @Column(name = "code")
    private String code;

    @ApiModelProperty(value = "角色名称")
    @Column(name = "name")
    private String name;

    @ApiModelProperty(value = "状态")
    @Column(name = "status")
    private Integer status;

    @ApiModelProperty(value = "角色描述")
    @Column(name = "remark")
    private String remark;

    private static final long serialVersionUID = 1L;

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId == null ? null : tenantId.trim();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code == null ? null : code.trim();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }
}
